
<?php echo doctype() ?>

<style>

table.stats
{text-align: center;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 580px;
background-color: #666;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;}

table.stats td
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: left;
border: 1px #fff solid;}

table.stats td.hed
{background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}

</style>

<div >
		<?php echo anchor('usuarios/view_publicador', 'Agregar Staff') ?>
		<br><br>
    <?php if (empty($query_users)): ?>

        <span>no existen usuarios publicadores</span>

    <?php else: ?>

        <table class="stats" align="center">
                <tr >
                    <td class="hed"></td>
                    <td class="hed">id</td>
                    <td class="hed">nombre</td>
                    <td class="hed">apellido</td>
                    <td class="hed">usuario</td>
                    <td class="hed">password</td>
                    <td class="hed">email</td>
                    <td class="hed">direccion</td>
                    <td class="hed">telefono</td>
                    <td class="hed"></td>
                </tr>
            <?php foreach($query_users->result() as $row){ ?>
                <?php echo form_open('usuarios/form_editar') ?>
                <tr>

                    <?php echo form_hidden( 'id' , $row->id );?>
                    <td><?php echo form_submit('editar', 'ver') ?></td>
                    <td ><?php echo $row->id ?></td>
                    <td ><?php echo $row->nombres ?></td>
                    <td ><?php echo $row->apellidos ?></td>
                    <td ><?php echo $row->nombre_usuario ?></td>
                    <td ><?php echo $row->password ?></td>
                    <td ><?php echo $row->email ?></td>
                    <td ><?php echo $row->direccion ?></td>
                    <td ><?php echo $row->telefono ?></td>
                    <td><?php echo form_submit('eliminar', 'eliminar') ?></td>

                </tr>
                <?php echo form_close() ?>
            <?php } ?>

        </table>

<script type="text/javascript">
	$(function(){
		$(":submit[name='eliminar']").click(function(evt){
			var agree = confirm("¿Está seguro?");
			if (!agree) {
				evt.preventDefault();
			}
		});
	});
</script>

<br><br>
<?php echo anchor('usuarios', 'volver') ?>

    <?php endif; ?>
        <br><br>
</div>
